package lab02.Test21;

import java.util.Scanner;

/**
 * Created by Administrator on 2017/10/31.
 */
public class Test {
    public static  int amount(String s,char c)
    {
        int cmt=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)==c)
            {
                cmt++;
            }
        }
        return cmt;
    }
    public static void main(String args[])
    {
        String str;
        Scanner scanner=new Scanner(System.in);
        str=scanner.next();
        System.out.println(amount(str,'a'));
    }
}
